// pages/pfep/baseData/ronqi/ronqi.js
const mybehavior = require("../../../../behaviors/requests")
const baseUrl = "https://logisticsengineering.gree.com/pfep2_api/photo_manage/"
import WxValidate from "../../../../Wx_Validate/WxValidate"

Page({

  /**
   * 页面的初始数据
   */
  behaviors: [mybehavior],
  data: {
    baseUrl: "https://logisticsengineering.gree.com/pfep2_api",
    submit_name: wx.getStorageSync('name'),
    uploader: [],
    choose_img_btn_disabled: false,
    fileList: [],
    popup_show1: false,
    options1: [],
    options11: [],
    popup_show11: false,
    options12: [],
    popup_show2: false,
    options2: ["容器库", "辅材库"],
    popup_show3: false,
    options3: [],
    material_group_list:[],
    popup_show4: false,
    options4: [],
    popup_show5: false,
    options5: ["A", "B", "C"],
    opinions_vla: "",
    unique_cond: {
      content: {
        applicable_area: "",
        category: "",
        code: "",
        color: "",
        company: "",
        database: "",
        dead_weight: "",
        image_id: [],
        internal_size: "",
        material_category: "",
        material: "",
        max_load: "",
        opinions: {},
        name: "",
        size: "",
        unit: "",
        grade: "",
        plate: "",
        operate_mode: "",
        material_group: [],
        use_in: [],
        apply_category: ""
      },
      receivers: [],
      sign_module: [],
      start_process: "编制",
      supply: "",
      unique_cond: { name: "", task_type: "供应商新增容器辅材数据申请" },
      use_in: "",
    },
    size: "",
    show1: false,
    params1: "",
    params2: "",
    params3: "",
    flag: "",
    search_value: "",
    search_value1: "",
    popup_show_bk: false,
    options_bk: [],
    popup_show_type: false,
    options_type: ["外购件", "自制件"],
    popup_show_material_category: false,
    options_material_category: [],
    popup_show_zy: false,
    options_zy: ["通用", "自动化", "人工"],
    popup_show_wlz: false,
    options_wlz: [],

  },
  // 保存页面数据
  saveData() {
    wx.requestSubscribeMessage({
      tmplIds: ['Qq4EMCt24ZVzeR74sHCcdCgZyo7pus8Bf9knNoUHPpM'],

    })
    let img_arr = this.data.uploader
    let img_arr1 = []
    if (img_arr.length != 0) {
      for (let i in img_arr) {
        let obj = {
          url: "http://10.2.11.67/pfep2_api/photo_manage/fs_download?file_id=" + img_arr[i].file_id,
          isImage: true,
          file_id: img_arr[i].file_id
        }
        img_arr1.push(obj)
      }
    }
    this.setData({
      'unique_cond.content.image_id': img_arr1
    })
    wx.setStorageSync('unique_cond', this.data.unique_cond)
    wx.showToast({
      title: '保存成功',
      icon: 'success'
    })


  },
  onSearch1(e) {
    console.log(e.detail);

    if (e.detail == "") {
      let arr = this.data.options11
      this.setData({
        options1: arr
      })
    } else {
      let list1 = this.data.options11
      let arr = []
      for (let i = 0; i < list1.length; i++) {
        if (list1[i].match(this.data.search_value) != null) {
          arr.push(list1[i]);
        }
      }
      this.setData({
        options1: arr
      })
    }
  },
  onSearch11(e) {
    console.log(e.detail);

    if (e.detail == "") {
      let arr = this.data.options11
      this.setData({
        options12: arr
      })
    } else {
      let list1 = this.data.options11
      let arr = []
      for (let i = 0; i < list1.length; i++) {
        if (list1[i].match(this.data.search_value11) != null) {
          arr.push(list1[i]);
        }
      }
      this.setData({
        options12: arr
      })
    }
  },
  bindClickIcon(e) {
    console.log(e.currentTarget.dataset.icon);
    wx.showToast({
      title: e.currentTarget.dataset.icon,
      icon: "none"

    })
  },
  // 点击--规格名称--选取输入框
  onClick14(e) {
    // event.detail 为当前输入的值
    console.log(e.currentTarget.dataset.name);
    this.setData({
      show1: true,
      flag: e.currentTarget.dataset.name
    })
  },
  // 生成--规格名称
  onConfirm1() {
    if (this.data.params1 != "" && this.data.params1 != "") {
      let val = this.data.params1 + "*" + this.data.params2 + "*" + this.data.params3
      let key = "unique_cond.content." + this.data.flag

      console.log(key);

      this.setData({
        show1: false,
        [key]: val,

      })
      let key1 = "unique_cond.content.name"

      let key11 = this.data.unique_cond.content.material_category + this.data.unique_cond.content.category + this.data.unique_cond.content.size + this.data.unique_cond.content.material + this.data.unique_cond.content.color

      this.setData({
        [key1]: key11,
        "unique_cond.unique_cond.name": key11,


      })
    }

  },
  // 生成--规格名称
  onClose11() {
    console.log("123");
    this.setData({
      show1: false,
      params1: "",
      params2: "",
      params3: "",
      flag: "",
    })
  },

  // 获取--容器辅材类别--数据
  getTypeDatas(e) {

    let url = this.data.baseUrl + "/unities_manage/query_unities "
    let data = {
      unity_type: e,
      name: "",
    }
    this.post(url, data).then(res => {
      console.log("容器辅材类别", res)
      let data_list = res.data


      if (res.code == 20000) {

        this.setData({
          options3: data_list,

        })

      } else {
        wx.showToast({
          title: res.msg,
          icon: 'error'
        })
      }
    }).catch(err => {
      console.log(err);
      wx.showToast({
        title: err.msg,
        icon: 'none'
      })
    })
  },
  // 获取计量单位数据
  getUnitDatas() {

    let url = this.data.baseUrl + "/unities_manage/query_unities "
    let data = {
      unity_type: "计数单位",
      name: "",
    }
    this.post(url, data).then(res => {
      console.log("获取计量单位数据", res)
      let data_list = res.data


      if (res.code == 20000) {

        this.setData({
          options4: data_list,

        })

      } else {
        wx.showToast({
          title: res.msg,
          icon: 'error'
        })
      }
    }).catch(err => {
      console.log(err);
      wx.showToast({
        title: err.msg,
        icon: 'none'
      })
    })
  },
  // 获取板块数据
  getBankuaiDatas() {

    let url = this.data.baseUrl + "/unities_manage/query_unities "
    let data = {
      unity_type: "板块",
      name: "",
    }
    this.post(url, data).then(res => {
      console.log("获取板块数据", res)
      let data_list = res.data


      if (res.code == 20000) {

        this.setData({
          options_bk: data_list,

        })

      } else {
        wx.showToast({
          title: res.msg,
          icon: 'error'
        })
      }
    }).catch(err => {
      console.log(err);
      wx.showToast({
        title: err.msg,
        icon: 'none'
      })
    })
  },
  // 照片选取
  try_upload(e) {
    const self = this;
    self.setData({
      choose_img_btn_disabled: true
    })
    wx.chooseMedia({
      count: 1,
      mediaType: ['image'],
      sourceType: ['album', 'camera'],
      maxDuration: 30,
      camera: 'back',
      success(res) {
        const tempFilePath = res.tempFiles[0].tempFilePath;
        console.log(tempFilePath);
        wx.showLoading({
          title: '开始上传。。。',
        })

        wx.uploadFile({
          url: "https://logisticsengineering.gree.com/pfep2_api/photo_manage/fs_upload",
          filePath: tempFilePath,
          name: 'file',
          formData: {
          },
          success(res) {
            const result = JSON.parse(res.data);
            console.log(result)
            wx.hideLoading();
            if (result.code == 20000) {
              const uploader = self.data.uploader;
              const new_uploader = uploader.concat({
                url: baseUrl + "fs_download?file_id=" + result.data.file_id,
                file_id: result.data.file_id,
                isImage: true
              })

              self.setData({
                uploader: new_uploader,

              })
              if (self.data.uploader.length < 3) {
                self.setData({
                  choose_img_btn_disabled: false
                })
              }
              wx.showToast({
                title: '上传成功！',
              })
            } else {
              if (self.data.uploader.length < 3) {
                self.setData({
                  choose_img_btn_disabled: false
                })
              }
              wx.showToast({
                title: result.msg,
                icon: "error"
              })
            }

          },
          fail(res) {
            wx.hideLoading();
            if (self.data.uploader.length < 3) {
              self.setData({
                choose_img_btn_disabled: false
              })
            }
            wx.showToast({
              title: "未知错误428",
              icon: "error"
            })
          }
        })

      },
      fail() {
        if (self.data.uploader.length < 3) {
          self.setData({
            choose_img_btn_disabled: false
          })
        }
      }



    })
  },
  handle_delete(e) {
    const index = e.detail.index;
    const file = this.data.uploader[index];
    const file_id = file.url.split("=")[1];
    const uploader = this.data.uploader;
    const self = this;

    let url1 = baseUrl + 'fs_delete'
    let data = {
      file_id
    }
    this.post(url1, data).then(res => {
      if (res.code == 20000) {
        wx.showToast({
          title: res.msg,
          icon: 'success'
        })

        uploader.splice(index, 1);
        self.setData({
          choose_img_btn_disabled: false,
        })
        self.setData({
          uploader
        });


      } else {
        wx.showToast({
          title: res.msg,
          icon: 'error'
        })
      }
    }).catch(err => {
      console.log(err);
      wx.showToast({
        title: err.msg,
        icon: 'none'
      })
    })
  },

  // 点击--板块--选取输入框
  onBKClick(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show_bk: true
    })
  },
  // 选择--板块--输入框关闭
  onBKClose() {
    this.setData({ popup_show_bk: false });
  },
  // 确认--板块--弹出框关闭
  onBKChange(event) {
    const { picker, value, index } = event.detail;
    this.setData({
      "unique_cond.content.plate": value,
      popup_show_bk: false,
    })
  },


  // 点击--适用类别--选取输入框
  onTypeClick(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show_type: true
    })
  },
  // 选择--适用类别--输入框关闭
  onTypeClose() {
    this.setData({ popup_show_type: false });
  },
  // 确认--适用类别--弹出框关闭
  onTypeChange(event) {
    const { picker, value, index } = event.detail;
    this.setData({
      "unique_cond.content.apply_category": value,
      popup_show_type: false,
    })
  },

  // 获取物料类别数据
  getMCDatas() {

    let url = this.data.baseUrl + "/unities_manage/query_unities "
    let data = {
      unity_type: "物料类别",
      name: "",
    }
    this.post(url, data).then(res => {
      console.log("获取物料类别数据", res)
      let data_list = res.data


      if (res.code == 20000) {

        this.setData({
          options_material_category: data_list,

        })

      } else {
        wx.showToast({
          title: res.msg,
          icon: 'error'
        })
      }
    }).catch(err => {
      console.log(err);
      wx.showToast({
        title: err.msg,
        icon: 'none'
      })
    })
  },
  // 点击--物料类别--选取输入框
  onMCClick(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show_material_category: true
    })
  },
  // 选择--物料类别--输入框关闭
  onMCClose() {
    this.setData({ popup_show_material_category: false });
  },
  // 确认--物料类别--弹出框关闭
  onMCChange(event) {
    const { picker, value, index } = event.detail;
    let key = value + this.data.unique_cond.content.category + this.data.unique_cond.content.size + this.data.unique_cond.content.material + this.data.unique_cond.content.color
    this.setData({
      "unique_cond.content.material_category": value,
      "unique_cond.content.name": key,
      "unique_cond.unique_cond.name": key,

      popup_show_material_category: false,
    })
  },


  // 点击--作业方式--选取输入框
  onZYClick(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show_zy: true
    })
  },
  // 选择--作业方式--输入框关闭
  onZYClose() {
    this.setData({ popup_show_zy: false });
  },
  // 确认--作业方式--弹出框关闭
  onZYChange(event) {
    const { picker, value, index } = event.detail;
    this.setData({
      "unique_cond.content.operate_mode": value,
      popup_show_zy: false,
    })
  },
  selectWLZ(e) {
    console.log(e.detail);
    let array = e.detail
    let res = []
    for (let i = 0; i < array.length; i++) {
      res.push(array[i].split('-')[0])
    }
    this.setData({
      "unique_cond.content.material_group": res,
      material_group_list: e.detail
    })
  },
  // 获取--物料组--数据
  getWLZDatas(e) {

    let url = this.data.baseUrl + "/folders_manage/query_sub_dir_managers "
    let data = {

    }
    this.post(url, data).then(res => {
      console.log("物料组数据", res)
      let data_list = res.data
      const res_arr = Object.entries(data_list).map(([key, value]) => `${key}-${value}`);
      if (res.code == 20000) {

        this.setData({
          options_wlz: res_arr,

        })

      } else {
        wx.showToast({
          title: res.msg,
          icon: 'error'
        })
      }
    }).catch(err => {
      console.log(err);
      wx.showToast({
        title: err.msg,
        icon: 'none'
      })
    })
  },
  // 点击--物料组--选取输入框
  onWLZClick(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show_wlz: true
    })
  },
  // 选择--物料组--输入框关闭
  onWLZClose() {
    this.setData({ popup_show_wlz: false });
  },
  // 确认--物料组--弹出框关闭
  onWLZChange(event) {
    const { picker, value, index } = event.detail;
    let arr = []
    arr.push(value)
    this.setData({
      "unique_cond.content.material_group": arr,
      popup_show_wlz: false,
    })
  },


  // 点击--公司名称--选取输入框
  onClick1(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show1: true
    })
  },
  // 选择--公司名称--输入框关闭
  onClose1() {
    this.setData({ popup_show1: false });
  },
  // 确认--公司名称值--弹出框关闭
  onChange1(event) {
    const { picker, value, index } = event.detail;
    this.setData({
      "unique_cond.content.company": value,
      popup_show1: false,
    })
  },

  // 点击--适用单位--选取输入框
  onClick11(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show11: true
    })
  },
  // 选择--适用单位--输入框关闭
  onClose12() {
    this.setData({ popup_show11: false });
  },
  // 确认--适用单位--弹出框关闭
  onChange11(event) {
    const { picker, value, index } = event.detail;
    let arr = []
    arr.push(value)

    this.setData({
      "unique_cond.content.use_in": arr,
      popup_show11: false,
    })
  },

  // 点击--所在库--选取输入框
  onClick2(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show2: true
    })
  },
  // 选择--所在库--输入框关闭
  onClose2() {
    this.setData({ popup_show2: false });
  },
  // 确认--所在库--弹出框关闭
  onChange2(event) {
    const { picker, value, index } = event.detail;
    console.log(value);
    if (value == "容器库") {
      this.setData({
        "unique_cond.content.database": value,
        popup_show2: false,
      })
      let val = "容器辅材类别-容器"
      this.getTypeDatas(val)

    } else {
      this.setData({
        "unique_cond.content.database": value,
        popup_show2: false,
      })
      let val = "容器辅材类别-辅材"
      this.getTypeDatas(val)
    }

  },

  // 点击--容器辅材类别--选取输入框
  onClick3(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show3: true
    })
  },
  // 选择--容器辅材类别--输入框关闭
  onClose3() {
    this.setData({ popup_show3: false });
  },
  // 确认--容器辅材类别--弹出框关闭
  onChange3(event) {
    const { picker, value, index } = event.detail;
    let key = value + this.data.unique_cond.content.category + this.data.unique_cond.content.size + this.data.unique_cond.content.material + this.data.unique_cond.content.color
    this.setData({
      "unique_cond.content.category": value,
      "unique_cond.content.name": key,
      "unique_cond.unique_cond.name": key,

      popup_show3: false,
    })
  },

  // 点击--计数单位--选取输入框
  onClick4(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show4: true
    })
  },
  // 选择--计数单位--输入框关闭
  onClose4() {
    this.setData({ popup_show4: false });
  },
  // 确认--计数单位--弹出框关闭
  onChange4(event) {
    const { picker, value, index } = event.detail;
    this.setData({
      "unique_cond.content.unit": value,
      popup_show4: false,
    })
  },
  // 点击--容器辅材等级--选取输入框
  onClick5(event) {
    // event.detail 为当前输入的值
    // console.log(event.detail);
    this.setData({
      popup_show5: true
    })
  },
  // 选择--容器辅材等级--输入框关闭
  onClose5() {
    this.setData({ popup_show5: false });
  },
  // 确认--容器辅材等级--弹出框关闭
  onChange5(event) {
    const { picker, value, index } = event.detail;
    this.setData({
      "unique_cond.content.grade": value,
      popup_show5: false,
    })
  },
  bindInput(e) {
    console.log("123");
    // 表单双向数据绑定
    let that = this;
    let dataset = e.currentTarget.dataset;
    let name = dataset.name;

    let value = e.detail;
    // 拼接对象属性名，用于为对象属性赋值
    let attributeName = 'unique_cond.content.' + name
    that.setData({
      [attributeName]: value
    });
    console.log(attributeName);
    if (attributeName == 'unique_cond.content.size' || attributeName == 'unique_cond.content.category' || attributeName == 'unique_cond.content.material' || attributeName == 'unique_cond.content.material_category' || attributeName == 'unique_cond.content.color') {
      console.log("xxx");
      let key = that.data.unique_cond.content.material_category + that.data.unique_cond.content.category + that.data.unique_cond.content.size + that.data.unique_cond.content.material + that.data.unique_cond.content.color
      console.log("asdsd", key);
      that.setData({
        'unique_cond.content.name': key,
        "unique_cond.unique_cond.name": key,

      });
    }

    console.log(that.data[name])
  },
  // 获取--供应商--数据
  getPermissionDatas() {
    let url = this.data.baseUrl + "/data_auth_manage/get_u_permission"
    let data = {

    }
    this.post(url, data).then(res => {
      // console.log("获取供应商数据", res.data)
      let data_list = Object.keys(res.data)
      // console.log("xxx", data_list);

      if (res.code == 20000) {

        this.setData({
          options11: data_list,
          options1: data_list,
          options12: data_list

        })

      } else {
        wx.showToast({
          title: res.msg,
          icon: 'error'
        })
      }
    }).catch(err => {
      console.log(err);
      wx.showToast({
        title: err.msg,
        icon: 'none'
      })
    })
  },


  resetBtn() {
    this.setData({
      baseUrl: "https://logisticsengineering.gree.com/pfep2_api",
      submit_name: wx.getStorageSync('name'),
      uploader: [],
      choose_img_btn_disabled: false,
      fileList: [],
      popup_show1: false,
      options1: [],
      material_group_list:[],
      options11: [],
      popup_show11: false,
      options12: [],
      popup_show2: false,
      options2: ["容器库", "辅材库"],
      popup_show3: false,
      options3: [],

      popup_show4: false,
      options4: [],
      popup_show5: false,
      options5: ["A", "B", "C"],
      opinions_vla: "",
      unique_cond: {
        content: {
          applicable_area: "",
          category: "",
          code: "",
          color: "",
          company: "",
          database: "",
          dead_weight: "",
          image_id: [],
          internal_size: "",
          material_category: "",
          material: "",
          max_load: "",
          opinions: {},
          name: "",
          size: "",
          unit: "",
          grade: "",
          plate: "",
          operate_mode: "",
          material_group: [],
          use_in: [],
          apply_category: ""
        },
        receivers: [],
        sign_module: [],
        start_process: "编制",
        supply: "",
        unique_cond: { name: "", task_type: "供应商新增容器辅材数据申请" },
        use_in: "",
      },
      size: "",
      show1: false,
      params1: "",
      params2: "",
      params3: "",
      flag: "",
      search_value: "",
      search_value1: "",
      popup_show_bk: false,
      options_bk: [],
      popup_show_type: false,
      options_type: ["外购件", "自制件"],
      popup_show_material_category: false,
      options_material_category: [],
      popup_show_zy: false,
      options_zy: ["通用", "自动化", "人工"],
      popup_show_wlz: false,
      options_wlz: [],
    })
  },
  // 提交按钮
  submit() {
    wx.requestSubscribeMessage({
      tmplIds: ['Qq4EMCt24ZVzeR74sHCcdCgZyo7pus8Bf9knNoUHPpM'],

    })
    let that = this
    console.log(this.data.unique_cond.content);

    let data = this.data.unique_cond.content
    let img_arr = this.data.uploader
    let img_arr1 = []
    if (img_arr.length != 0) {
      for (let i in img_arr) {
        let obj = {
          url: "http://10.2.11.67/pfep2_api/photo_manage/fs_download?file_id=" + img_arr[i].file_id,
          isImage: true,
          file_id: img_arr[i].file_id
        }
        img_arr1.push(obj)
      }
    }
    this.setData({
      'unique_cond.content.image_id': img_arr1
    })
    if (!that.WxValidate.checkForm(data)) {
      const error = that.WxValidate.errorList[0]
      wx.showToast({
        title: error.msg,
        icon: 'none'
      })
    } else {
      let submiter = wx.getStorageSync('name')
      let obj = {
        [submiter]: this.data.opinions_vla
      }
      this.setData({
        'unique_cond.content.opinions': obj
      })
      let paload = this.data.unique_cond
      console.log("111", paload);
      let url = this.data.baseUrl + "/supply_container_manage/add_supply_container"
      this.post(url, paload).then(res => {
        console.log(res);
        if (res.code == 20000) {
          this.resetBtn()
          wx.showToast({
            title: res.msg,
            icon: 'success'
          })
          wx.removeStorageSync('unique_cond')
        } else {
          wx.showToast({
            title: res.msg,
            icon: 'error'
          })
        }
      }).catch(err => {
        console.log(err);
        wx.showToast({
          title: err.msg,
          icon: 'error'
        })
      })
    }
  },
  //初始化表单验证规则
  initValidate() {
    let rules = {
      // company: {
      //     required: true,
      // },
      database: {
        required: true,
      },
      category: {
        required: true,
      },

      internal_size: {
        required: true,
      },
      size: {
        required: true,
      },
      name: {
        required: true,
      },
      color: {
        required: true,
      },
      unit: {
        required: true,
      },
      dead_weight: {
        required: true,
      },
      image_id: {
        required: true,
      },



    }
    let message = {
      // company: {
      //     required: '公司名称-不能为空',
      // },
      database: {
        required: '所在库-不能为空',
      },
      category: {
        required: '容器辅材类别-不能为空',
      },

      internal_size: {
        required: '内部有效尺寸-不能为空',
      },

      size: {
        required: '规格-不能为空',
      },
      name: {
        required: '名称-不能为空',
      },
      color: {
        required: '颜色-不能为空',
      },
      unit: {
        required: '计数单位-不能为空',
      },
      dead_weight: {
        required: '自重-不能为空',
      },
      image_id: {
        required: '图片-不能为空',
      },




    }
    //实例化当前的验证规则和提示消息
    this.WxValidate = new WxValidate(rules, message);
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.initValidate()
    this.getPermissionDatas()
    this.getUnitDatas()
    this.getBankuaiDatas()
    this.getMCDatas()
    this.getWLZDatas()
    let gs = wx.getStorageSync('company')
    let row = wx.getStorageSync('unique_cond')
    let img = row.content.image_id
    let upload = []
    for (let i in img) {
      let obj = {
        url: "http://logisticsengineering.gree.com/pfep2_api/photo_manage/fs_download?file_id=" + img[i].file_id,
        isImage: true,
        file_id: img[i].file_id
      }
      upload.push(obj)
    }


    this.setData({
      ["unique_cond.content.company"]: gs,
      unique_cond: row,
      uploader: upload
    })

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})